<template>
   <el-carousel :interval="4000" type="card" height="300px">
      <el-carousel-item v-for="item in agritainmentArr" :key="item.id">
         <img :src="item.img" :alt="item.title" @click="goDetail(item)">
         <!-- <img src="../../../assets/logo.0a3252a6.png" :alt="item.title" @click="goDetail(item)"> -->

      </el-carousel-item>
   </el-carousel>
</template>
<script>
export default {
   name: 'Carousel',
   components: {

   },
   mixins: [],
   props: ['agritainmentArr'],
   data() {
      return {

      }
   },
   computed: {

   },
   watch: {

   },
   mounted() {
   },
   methods: {
      goDetail(item) {
         this.$router.push({
            path: '/detail',
            query: {
               id: item.id
            }
         })
      }

   }
};
</script>
<style lang='less' scoped>
.el-carousel__item img {
   width: 100%;
   height: 100%;
   cursor: pointer;

}
</style>